package chances.epg.ui.taglib.model;

import java.util.ArrayList;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonIgnore;

@SuppressWarnings("serial")
public class LinkModel implements java.io.Serializable {
	private String id;
	private String href;
	@JsonIgnore
	Rect rect;
	@JsonIgnore
	Rect linkRect;
	private String group;
	private String onblur;
	private String onfocus;
	private String onkeypress;
	private String title;
	private String alt;
	private String code;
	@JsonIgnore
	private Rect parentRect;

	private List<EffectEntry> effects = new ArrayList<EffectEntry>();
	private String cursor;
	private String focusCursor;
	Direction direction = new Direction();
	private boolean disable;
	@JsonIgnore
	private Rect offset;

	public void addEffect(String name, String key) {
		EffectEntry entry = new EffectEntry(name, key);
		this.effects.add(entry);
	}

	public LinkModel() {
		super();
	}

	public LinkModel(Rect aRect) {
		this.rect = aRect;
	}

	public String getId() {
		return id;
	}

	public String getHref() {
		return href;
	}

	@JsonIgnore
	public Rect getRect() {
		return rect;
	}

	public void setId(String id) {
		this.id = id;
	}

	public void setHref(String href) {
		this.href = href;
	}

	public void setRect(Rect rect) {
		this.rect = rect;
	}

	public String getGroup() {
		return group;
	}

	public void setGroup(String group) {
		this.group = group;
	}

	public String getFocusCursor() {
		return focusCursor;
	}

	public String getOnblur() {
		return onblur;
	}

	public String getOnfocus() {
		return onfocus;
	}

	public String getOnkeypress() {
		return onkeypress;
	}

	public void setOnblur(String onblur) {
		this.onblur = onblur;
	}

	public void setOnfocus(String onfocus) {
		this.onfocus = onfocus;
	}

	public void setOnkeypress(String onkeypress) {
		this.onkeypress = onkeypress;
	}

	public void setFocusCursor(String focusCursor) {
		this.focusCursor = focusCursor;
	}

	public String getTitle() {
		return title;
	}

	public String getAlt() {
		return alt;
	}

	public String getCursor() {
		return cursor;
	}

	public void setCursor(String cursor) {
		this.cursor = cursor;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public Rect getParentRect() {
		return parentRect;
	}

	public void setParentRect(Rect parentRect) {
		this.parentRect = parentRect;
	}

	public void setAlt(String alt) {
		this.alt = alt;
	}

	public List<EffectEntry> getEffects() {
		return effects;
	}

	public Direction getDirection() {
		return direction;
	}

	public void setDirection(Direction direction) {
		this.direction = direction;
	}

	public Rect getOffset() {
		return offset;
	}

	public void setOffset(Rect offset) {
		this.offset = offset;
	}

	public boolean isDisable() {
		return disable;
	}

	public void setDisable(boolean disable) {
		this.disable = disable;
	}

	public Rect getLinkRect() {
		return linkRect;
	}

	public void setLinkRect(Rect linkRect) {
		this.linkRect = linkRect;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

}
